/*
 * @Author: your name
 * @Date: 2021-08-25 11:37:11
 * @LastEditTime: 2021-08-25 18:17:39
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: /backend/src/main/java/com/buaa/demo/Service/ServiceImplements/UserServiceImpl.java
 */
package com.buaa.demo.Service.ServiceImplements;

import com.buaa.demo.Dao.UserDao;
import com.buaa.demo.Entity.User;
import com.buaa.demo.Service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    public UserDao userDao;

    @Override
    public User getUserByEmail(String email) {
        return userDao.getUserByEmail(email);
    }

    @Override
    public User getUserByUID(int u_id) {
        return userDao.getUserByUID(u_id);
    }

    @Override
    public void registerNewUser(User u) {
        userDao.registerNewUser(u);
    }

    @Override
    public void changePassword(String email, String password) { userDao.changePassword(email, password); }
}
